<%-- 
    Document   : index
    Created on : Mar 21, 2013, 9:14:13 PM
    Author     : carlos
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" 
        import="model.entity.Proprietario,Dao.ProprietarioDao,java.util.ArrayList" %>
<jsp:useBean id="listProprietario" type="ArrayList" scope="request"/>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Lista de Proprietarios</title>
    <link rel="stylesheet" href="css/estilo.css" type="text/css" />
  </head>
  <body>
    <h1>Lista de Proprietario</h1>
    <div class="listaProprietario">
    <a href="/av1/cadproprietario.jsp">Cadastrar Proprietario</a>
    <table border="1">
      <tr>
        <td>Nome</td>
        <td>CPF</td>
        <td>Data de Nascimento</td>
        <td>E-mail</td>
        <td>Telefone</td>
        <td>Endereço</td>
        <td>Bairro</td>
        <td>CEP</td>
        <td>Cidade</td>
      </tr>
      <c:forEach items="${listProprietario}" var="obj">
        <tr>
          <td>${obj.nome}</td>
          <td>${obj.cpf}</td>
          <td>${obj.dataDeNascimento}</td>
          <td>${obj.email}</td>
          <td>${obj.fone}</td>
          <td>${obj.endereco}</td>
          <td>${obj.bairro}</td>
          <td>${obj.cep}</td>
          <td>${obj.cidade}</td>
          <td><a href="/av1/selectproprietario?cpf=${obj.cpf}">Alterar</a></td>
          <td><a href="/av1/excluirproprietario?cpf=${obj.cpf}">Excluir</a></td>
        </tr>
      </c:forEach>
    </table>
    </div>
  </body>
</html>
